<!-- Data Tables -->
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>{:lang('Wallet address')}</h5>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal m-t">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">{:lang('Username')}：</label>
                            <div class="col-sm-8">
                                <input id="username" name="username" minlength="2" type="text" class="form-control" value="{$info.username}" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">{:lang('Wallet address')}：</label>
                            <div class="col-sm-8">
                                <input id="eth" type="text" class="form-control" name="eth" value="{$info['eth']}" readonly="readonly" aria-required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <div class="btn btn-primary" id="duplicate" onclick="copyText()">{:lang('Duplicate wallet address')}</div>
                            </div>

                        </div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <a href="receivables.html"><div class="btn btn-primary" id="duplicate" ">{:lang('Receivables')}</div></a>
                            </div>

                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">

    function operateFormatter(value, row, index) {
        return [
            '<a class="btn btn-xs edit" href="javascript:void(0)" title="{$Think.lang.Edit}">',
            '<i class="fa fa-edit"></i>',
            '</a>  ',
            '<a class="btn btn-xs delete" href="javascript:void(0)" title="{$Think.lang.Delete}">',
            '<i class="fa fa-trash"></i>',
            '</a>'
        ].join('');
    }

    var operateEvents = {
        'click .edit': function (e, value, row, index) {
            var param = {
                url: "{:url('admin/user/edit');}",
                data: {id: row.id}
            }
            $("#table").gridView('loadModal', param.url,param.data)
        },
        'click .delete': function (e, value, row, index) {
            $("#table").gridView('deleteModal', 'delete', row)
            
        }
    };
</script>
<script type="text/javascript">
    function copyText() {
      var eth = document.getElementById("eth");
      eth.select(); 
      document.execCommand("Copy"); 
      alert("{:lang('Duplicate success')}");
    }
</script>  

<script type="text/javascript">
    function copyText() {
      var eth = document.getElementById("eth");
      eth.select(); 
      document.execCommand("Copy"); 
      alert("{:lang('Duplicate success')}");
    }
</script>  
